import service from '@/utils/request'
// @Tags EquipmentPart
// @Summary 创建设备件
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.EquipmentPart true "创建设备件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /EP/createEquipmentPart [post]
export const createEquipmentPart = (data) => {
  return service({
    url: '/EP/createEquipmentPart',
    method: 'post',
    data
  })
}

// @Tags EquipmentPart
// @Summary 删除设备件
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.EquipmentPart true "删除设备件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /EP/deleteEquipmentPart [delete]
export const deleteEquipmentPart = (params) => {
  return service({
    url: '/EP/deleteEquipmentPart',
    method: 'delete',
    params
  })
}

// @Tags EquipmentPart
// @Summary 批量删除设备件
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除设备件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /EP/deleteEquipmentPart [delete]
export const deleteEquipmentPartByIds = (params) => {
  return service({
    url: '/EP/deleteEquipmentPartByIds',
    method: 'delete',
    params
  })
}

// @Tags EquipmentPart
// @Summary 更新设备件
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.EquipmentPart true "更新设备件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /EP/updateEquipmentPart [put]
export const updateEquipmentPart = (data) => {
  return service({
    url: '/EP/updateEquipmentPart',
    method: 'put',
    data
  })
}

// @Tags EquipmentPart
// @Summary 用id查询设备件
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.EquipmentPart true "用id查询设备件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /EP/findEquipmentPart [get]
export const findEquipmentPart = (params) => {
  return service({
    url: '/EP/findEquipmentPart',
    method: 'get',
    params
  })
}

// @Tags EquipmentPart
// @Summary 分页获取设备件列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取设备件列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /EP/getEquipmentPartList [get]
export const getEquipmentPartList = (params) => {
  return service({
    url: '/EP/getEquipmentPartList',
    method: 'get',
    params
  })
}

// @Tags EquipmentPart
// @Summary 不需要鉴权的设备件接口
// @Accept application/json
// @Produce application/json
// @Param data query wearingpartsDefinitionReq.EquipmentPartSearch true "分页获取设备件列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /EP/getEquipmentPartPublic [get]
export const getEquipmentPartPublic = () => {
  return service({
    url: '/EP/getEquipmentPartPublic',
    method: 'get',
  })
}
